<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			function show(){
				var _cid=cid.value;
				var xhr=new XMLHttpRequest();
				xhr.open("delete",`/shopping/v1/shopping_del/${_cid}`,true);
				xhr.send();
				xhr.onreadystatechange=function(){
					// console.log(1);
					if(xhr.readyState==4 && xhr.status==200){
						var r=xhr.responseText;
						if(r==1){
							d1.innerHTML="删除成功"
						}else{
							d1.innerHTML="删除失败"
						}
					}
				}
			}
		</script>
	</head>
	<body>
		<input type="text" id="cid">编号<br>
		<button onclick="show()">删除</button>
		<div id="d1"></div>
	</body>
</html>
